package com.sans.oop;

import org.junit.Test;

/**
 * @author Sans
 */
public class AbstractClassTest {
    static abstract class BaseCar{
        public abstract void info();
    }
    static class Audi extends BaseCar{
        @Override
        public void info() {
            System.out.println("我是奥迪...");
        }
    }

    static class Auto extends BaseCar{
        @Override
        public void info() {
            System.out.println("我是奥拓...");
        }
    }
    @Test
    public void build(){
        BaseCar audi = new Audi();
        audi.info();
        BaseCar auto = new Auto();
        auto.info();
    }
}
